package com.sbr.seb.rule.test.service.impl;

import java.util.ArrayList;
import java.util.Collection;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sbr.seb.rule.Specification;
import com.sbr.seb.rule.annotation.ISpecification;
import com.sbr.seb.rule.element.PasswordMinLengthSpecification;
import com.sbr.seb.rule.exception.SpecificationException;
import com.sbr.seb.rule.test.service.PasswordService;

public class PasswordServiceImpl implements PasswordService {
	
	private static final Logger logger = LoggerFactory.getLogger(PasswordServiceImpl.class);
	
	
	@Override
	public Collection<Specification<String>> getSpecifications() {
		
		Collection<Specification<String>> specList = new ArrayList<Specification<String>>();
		specList.add(new PasswordMinLengthSpecification());
		
		return specList;
	}

	@Override
	@ISpecification
	public void checkPassword(String password) throws SpecificationException {
		logger.info("password is checked !!");
	}

}
